// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "imageInfo.h"
#include "ST_SimpleScreenshot.generated.h"
//DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_ThreeParams
//DECLARE_MULTICAST_DELEGATE_ThreeParams
DECLARE_DYNAMIC_MULTICAST_DELEGATE_ThreeParams(FOnSimpleScreenshotCaptured, int32 ,Width, int32 ,Height, const TArray<FColor>& ,Colors);

UCLASS()
class ST_SCREENSHOT_API AST_SimpleScreenshot : public AActor
{
	GENERATED_BODY()
private:
	bool isInShot = false;
	int shotWidth = 0;
	int shotHeight = 0;
	TArray<FColor> backColors;
public:

	UFUNCTION(BlueprintCallable, Category = "SimpleScreenshot", meta = (WorldContext = "WorldContextObject"))
	static AST_SimpleScreenshot* GetSimpleScreenshot(UObject* WorldContextObject);
	
public:
	void InitSimpleScreenshot();

	UPROPERTY(BlueprintAssignable, Category = "SimpleScreenshot")
	FOnSimpleScreenshotCaptured onSimpleScreenshotCaptured;

public:
	UFUNCTION(BlueprintCallable, Category = "SimpleScreenshot")
		bool HightShotNow( int multiple = 1);


private:
	UFUNCTION()
	void OnShotCallBack(int32 Width, int32 Height, const TArray<FColor>& Colors);

public:	
	// Sets default values for this actor's properties
	AST_SimpleScreenshot();

protected:
	// Called when the game starts or when spawned
	virtual void BeginPlay() override;


	virtual void  BeginDestroy() override;
public:	
	// Called every frame
	virtual void Tick(float DeltaTime) override;

};
